-- GENERATED SPELL FOR [Laughing Skull Rogue] --


function spell0_17491(pUnit, Event) --@Kidney Shot,n/a--
pUnit:FullCastSpellOnTarget(30832,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17491', 3000, 1)
end

function spell1_17491(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(34969,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17491', 30000, 1)
end

function spell2_17491(pUnit, Event) --@Slice and Dice,Self--
pUnit:FullCastSpellOnTarget(6434,pUnit)
pUnit:RegisterEvent('Sorts_17491', 10285, 1)
end

function spell3_17491(pUnit, Event) --@Stealth,Self--
pUnit:FullCastSpellOnTarget(30991,pUnit)
pUnit:RegisterEvent('Sorts_17491', 0, 1)
end

function Sorts_17491(pUnit, Event)
local choix_sorts_17491 = math.random(0, 3)
if choix_sorts_17491 == 0 then
pUnit:RegisterEvent('spell0_17491', 1, 1)
end
if choix_sorts_17491 == 1 then
pUnit:RegisterEvent('spell1_17491', 1, 1)
end
if choix_sorts_17491 == 2 then
pUnit:RegisterEvent('spell2_17491', 1, 1)
end
if choix_sorts_17491 == 3 then
pUnit:RegisterEvent('spell3_17491', 1, 1)
end
end

function mob17491_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17491', math.random(1500, 3000), 1)
end

function mob17491_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17491_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17491_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17491, 1, 'mob17491_Action')
RegisterUnitEvent(17491, 2, 'mob17491_Leave')
RegisterUnitEvent(17491, 3, 'mob17491_Kill')
RegisterUnitEvent(17491, 4, 'mob17491_Die')
